home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / play / DMODP35b.lha / DASModPlayer / Rexx / makeAlist.drx < prev    next >
Text File  |  1994-08-12  |  2KB  |  63 lines

  1. /*
  2.     MakeAList.drx   V.0.1   First version
  3.     
  4.     This arexx script extracts the author listing from D.A.S.MP
  5.     and outputs it as organized listing.
  6.  
  7. */
  8.  
  9. OPTIONS Results
  10. ADDRESS 'DASMP'
  11.  
  12. indexwidth = 3
  13. handlewidth = 35
  14. realnwidth = 30
  15.  
  16. AUTHORCOUNT
  17. authcount=result
  18. firstauth = 0
  19. listedauth = 0
  20. listheader3 = 'Listing extracted from D.A.S.MP by MakeAList.drx V0.1'
  21. listheader1 = left("Num", indexwidth)' 'left("Handle/Group", handlewidth)' 'left("Real Name", realnwidth)
  22. listheader2 = '---------------------------------------------------------------------------'
  23.  
  24. say listheader3
  25. say listheader1
  26. say listheader2
  27.  
  28. DO currentauth = firstauth to authcount-1
  29.     MOVETOAUTH currentauth
  30.     GETAUTHNAME
  31.     authname=result
  32.     isstyle=index(authname,'-')
  33.     if isstyle ~= 1 THEN DO
  34.         listedauth = listedauth+1
  35.         authspec=authname
  36.         CALL ParseAuthorName(authspec)
  37.         handlename=result
  38.         CALL ParseAuthorName2(authspec)    
  39.         realname=result
  40.         say left(listedauth, indexwidth)' 'left(handlename, handlewidth)' 'left(realname, realnwidth)
  41.     END
  42. END
  43.  
  44. EXIT
  45.  
  46. ParseAuthorName: procedure
  47.     parse arg AuthorName
  48.         DivPos = pos('<', AuthorName)
  49.     if DivPos = 0
  50.         then return AuthorName
  51.     else
  52.         return strip(left(AuthorName, DivPos-1),'T','<')
  53.  
  54. ParseAuthorName2: procedure
  55.     parse arg AuthorName
  56.         DivPos = pos('<', AuthorName)
  57.     if DivPos = 0
  58.         then return ' '
  59.     else
  60.         authlen=length(AuthorName)
  61.         return right(AuthorName, authlen-DivPos+1)
  62.  
  63.